package com.wshoto.ocean.feign.client.fallback.factory;

import com.wshoto.ocean.feign.client.*;
import com.wshoto.ocean.feign.client.fallback.*;
import feign.hystrix.*;
import org.springframework.stereotype.*;

import javax.annotation.*;

/**
 * AppServiceFeignFallBackFactory
 *
 * @author Lee
 */
@Component
public class AppServiceFeignFallBackFactory implements FallbackFactory<AppServiceFeign> {

    @Resource
    private AbstractAppServiceFeignFallBack abstractAppServiceFeignFallBack;

    @Override
    public AppServiceFeign create(Throwable throwable) {
        abstractAppServiceFeignFallBack.setThrowable(throwable);
        return abstractAppServiceFeignFallBack;
    }
}
